package cn.hinglo.common.plugin.mqtt;

import org.eclipse.paho.client.mqttv3.IMqttMessageListener;
import org.eclipse.paho.client.mqttv3.MqttMessage;

/**
 * @createTime: 2020/3/30 : 11:34
 * @author: HingLo
 * @description: Hello
 */
@MqttListener(value = "hinglo2", qos = 2)
public class PushCallbackTop2 implements IMqttMessageListener {
    @Override
    public void messageArrived(String topic, MqttMessage message) throws Exception {
        System.out.println("接收消息主题 : " + topic);
        System.out.println("接收消息Qos : " + message.getQos());
        System.out.println("接收消息内容 : " + new String(message.getPayload()));
    }
}
